package com.make.house.api.repository.video;

import com.make.house.api.entity.video.VideoEntity;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import java.util.ArrayList;

/**
 * Created by yanglinlong on 18/8/21.
 */
@Repository
public interface VideoRepository extends JpaRepository<VideoEntity, Integer> {

    VideoEntity findById(int id);

    ArrayList<VideoEntity> findByTidOrderByIsTopDescIdAsc(int tid);

    ArrayList<VideoEntity> findTop3ByTidOrderByIsTopDescIdAsc(int tid);
}
